public class ext_GenerateVRFPDFTemplate {
    Public String TAMM {get; set;}
    Public String PreApproval{get; set;}
    Public String Transfer {get; set;}
    private final Health_Card_Renewal_Form__c HCRF;
    Public List<Barcode__c> Barcodes {get; set;}
    public string bc1 {get; set;}
    public string bc2 {get; set;}
    public string bc3 {get; set;}
    public string bc4 {get; set;}
   
    
    
    public ext_GenerateVRFPDFTemplate(ApexPages.StandardController controller) 
    {
         this.HCRF= (Health_Card_Renewal_Form__c)controller.getRecord();
         
         Barcodes = [SELECT id, name, Image_URL__c, Application__c FROM Barcode__c WHERE Application__c = :HCRF.id];
         if(Barcodes.size() > 3)
         {
                bc1 = Barcodes[0].Image_URL__c;
                bc2 = Barcodes[1].Image_URL__c;
                bc3 = Barcodes[2].Image_URL__c;
                bc4 = Barcodes[3].Image_URL__c;
         }
         else
         {
                 bc1 = Barcodes[0].Image_URL__c;
                 bc2 = Barcodes[1].Image_URL__c;
                 bc3 = Barcodes[2].Image_URL__c;
         }
         Tamm = 'TAMM VIP Service';
         PreApproval = 'Pre-approval required';
         Transfer = 'Transfer';   
    }
}